package com.ailargemodel.common;


import com.ailargemodel.pojo.User;
import lombok.extern.slf4j.Slf4j;

/*
TreadLocal 只是用作 单线程 , 线程借宿后会哦自动销毁 remove
 */
@Slf4j
public class UserThreadLocal {
//    未使用
    private static final ThreadLocal<User> TLUser = new ThreadLocal<>();
    public static User get(){
        return TLUser.get();
    }
    public static void SetUser(String name,String studyId){
        TLUser.set(new User(name,studyId));
    }
}
